-
Notifications
You must be signed in to change notification settings - Fork 121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
misc: group key testing #717
Conversation
Looks like I caused an issue in unrelated --- FAIL: TestAssetExportLog (0.71s)
test_sqlite.go:11: Creating new SQLite DB for testing
assets_store_test.go:1455:
Error Trace: /home/runner/work/taproot-assets/taproot-assets/tapdb/assets_store_test.go:1455
Error: Not equal:
expected: 0x1
actual : 0x0
Test: TestAssetExportLog
FAIL
FAIL github.com/lightninglabs/taproot-assets/tapdb 9.782s
FAIL |
In this commit, we update multiple unit tests to not set an asset group key directly, and instead use some test helper that calls asset.New(). This ensures that the group witness is copied into the asset. The only time setting the group key directly is acceptable is before a group witness has been created, or in a minting request.
94693c6
to
8f77090
Compare
Fixed unit flake, asset version wasn't being passed properly. Not sure why |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎉
Nice work bumping up the test coverage 😎
Witness: a.GroupKey.Witness, | ||
RawKey: a.GroupKey.RawKey, | ||
GroupPubKey: a.GroupKey.GroupPubKey, | ||
TapscriptRoot: a.GroupKey.TapscriptRoot, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Spun out of #549 . Adds a few test cases related to group key handling following the group key derivation algorithm changes and storage changes that were included in 0.3.0. We also remove some clearly-redunant error checking in proof validation.
Coverage for
asset
increases by 3.6% to 70.8%, fortapdb
an increase of 0.2% to 66.1%, and forproof
an increase of 0.4% to 56.1%.